package com.yqyd.quartz.task;

import com.yqyd.common.core.redis.RedisCache;
import com.yqyd.common.utils.StringUtils;
import com.yqyd.common.utils.WechatUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 定时任务调度测试
 * 
 * @author Dhq
 */
@Component("Wechat")
public class Wechat
{
    private final static String APPID = "wx70204e73d64c27cd";
    private final static String APP_SECRET = "0730dca831e2f9d9b4562ea46fe3d174";


    @Resource
    private RedisCache redisCache;


    public void Token()
    {
        String token = WechatUtils.token(APPID, APP_SECRET);
        // 更新
        redisCache.setCacheObject("wechat_token", token);
    }
}
